/**
 * 【程序19】   
 * 题目：打印出如下图案（菱形）   
 *      *   
 *     ***   
 *    *****   
 *   *******   
 *    *****   
 *     ***   
 *      *   
 */
public class test19 {
    public static void main(String[] args) {
        int row = 11;
        int up = (row / 2) + 1;
        int down = row - up;
        for (int i = 1; i <= up; i++) {
            for (int j = 0; j < up - i; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <= 2 * i - 1; j++) {
                System.out.print("*");
            }
            for (int j = 0; j < up - i; j++) {
                System.out.print(" ");
            }
            System.out.println();
        }
        for (int i = down; i >= 1; i--) {
            for (int j = 1; j <= down - i + 1; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <= 2 * i - 1; j++) {
                System.out.print("*");
            }
            for (int j = 1; j <= down - i + 1; j++) {
                System.out.print(" ");
            }
            System.out.println();
        }
    }
}
